renderCustom

open override fun renderCustom(context: DrawContext, x: Int, y: Int, width: Int, height: Int, mouseX: Int, mouseY: Int, delta: Float)

Custom foreground rendering for the widget. By default, will render the label.

Author

fzzyhmstrs

Since

0.6.0

Parameters

context

DrawContext

x

X position for rendering. This is not necessarily the widgets x position. Subclasses can shift this position, to, for example, shift the label over to make room for an icon.

y

Y position for rendering. This is not necessarily the widgets y position. Subclasses can shift this position, to, for example, shift the label up to fit something underneath it.

width

render width. Not necessarily widget width. If you modify x, it's recommended to counter-modify this to keep rendered space consistent with the background

height

render height. Not necessarily widget height. If you modify y, it's recommended to counter-modify this to keep rendered space consistent with the background

mouseX

current horizontal screen position of the mouse

mouseY

current vertical screen position of the mouse

delta

screen frame delta